#include <iostream>

using namespace std;

//求1-n的累加和
class A{
public:
    A()
    {
        _sum+=_i;
        _i++;
    }

    static int GetSum()
    {
        return _sum;
    }
    static void init()
    {
        _i=1;
        _sum=0;
    }
private:
    static int _i;
    static int _sum;
};
int A::_i=1;
int A::_sum=0;

class Solution {
public:
    int Sum_Solution(int n) {
        //A a[n]; //数组里面的每一个数都要去调用构造函数构造
        return A::GetSum();
         A::init();
    }
};

